{extend name='public/base'}
{block name='content'}
<style type="text/css">
  .pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover{
    background-color: green
  }
</style>
	<!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        系统
        <small>配置</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 系统</a></li>
        <li class="active">系统日志</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row" >
        <div class="col-xs-12">
          <!-- /.box -->
          <div class="box" style="">
            <div class="box-header">
              <h3 class="box-title">列表</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body"  style="width: 800px;">

                <form    id="mainForm" class="layui-form layui-form-line layui-form-pane" method='post' action='updateSiteConfig'>

                    <div class="layui-form-item">
                        <label class="layui-form-label">网站标题</label>
                        <div class="layui-input-block">
                          <input type="text" value="{$site_config.title|default=''}" name="site_config[title]" required  lay-verify="required" placeholder="请输入网站标题" autocomplete="off" class="layui-input">
                        </div>
                      </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">公司名称</label>
                        <div class="layui-input-block">
                          <input type="text" value="{$site_config.company|default=''}" name="site_config[company]" required  lay-verify="required" placeholder="请输入公司名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item layui-input-inline">
                          <label class="layui-form-label">SEO标题</label>
                          <div class="layui-input-block">
                            <input  value="{$site_config.seo|default=''}" type="text" name="site_config[seo]"    placeholder="请输入SEO标题" autocomplete="off" class="layui-input">
                          </div>
                    </div>

                    <div class="layui-form-item layui-input-inline">
                          <label class="layui-form-label">SEO关键字</label>
                          <div class="layui-input-block">
                            <input value="{$site_config.keywords|default=''}" type="text" name="site_config[keywords]"    placeholder="请输入SEO关键字" autocomplete="off" class="layui-input">
                          </div>
                    </div>

                    <div class="layui-form-item layui-input-inline">
                          <label class="layui-form-label">SEO说明</label>
                          <div class="layui-input-block">
                            <input  value="{$site_config.description|default=''}"  type="text" name="site_config[description]"     placeholder="请输入SEO说明" autocomplete="off" class="layui-input">
                          </div>
                    </div>

                    <div class="layui-form-item">
                          <label class="layui-form-label">版权信息</label>
                          <div class="layui-input-block">
                            <input type="text" value="{$site_config.version|default=''}"  type="text" name="site_config[version]"       placeholder="请输入版权信息" autocomplete="off" class="layui-input">
                          </div>
                    </div>

                    <div class="layui-form-item">
                          <label class="layui-form-label">ICP备案号</label>
                          <div class="layui-input-block">
                            <input value="{$site_config.ICP|default=''}" type="text" name="site_config[ICP]"     placeholder="请输入ICP备案号" autocomplete="off" class="layui-input">
                          </div>
                    </div>

                    <div class="layui-form-item layui-form-text">
                    <label for="desc" class="layui-form-label">
                        统计代码
                    </label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入内容"  name="site_config[code]"  class="layui-textarea"> {$site_config.code|default=''}</textarea>
                    </div>
                </div>

                <div class="" class="layui-form-item" >
                        <div class="layui-input-block submit_btn">
                          <button   class="layui-btn" lay-submit lay-filter="*">提交</button>
                          <button style="display: none;"  type="reset" class=" layui-btn layui-btn-primary">重置</button>
                        </div>
                </div>

                </form>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
{/block}
{block name='js'}
  <script type="text/javascript">
      $(function(){
        var options = {
              type:'post',           //post提交
              //url:'http://ask.tongzhuo100.com/server/****.php?='+Math.random(),   //url
              dataType:"json",        //json格式
              data:{},    //如果需要提交附加参数，视情况添加
              clearForm: false,        //成功提交后，清除所有表单元素的值
              resetForm: false,        //成功提交后，重置所有表单元素的值
              cache:false,
              async:false,          //同步返回
              success:function(data){
                    if(data.code==0){
                      layer.msg(data.msg);
                    }else{
                      layer.msg(data.msg,{icon:1,time:500},function(){
                        $("#reset").click();
                        lotus_close();
                        parent.location.reload();
                      });
                    }
                  //服务器端返回处理逻辑
                },
                error:function(XmlHttpRequest,textStatus,errorThrown){
                  layer.msg('操作失败:服务器处理失败');
              }
            };
          layui.use('form', function(){
            var form = layui.form;
            $('#mainForm').ajaxForm(options).submit(function(data){});
          });

        })
      // });
  </script>
{/block}


